import time

def metric(fn):
    def int_time(*args, **kwargs):
        start_time = time.time()
        fn(*args, **kwargs)
        end_time = time.time()
        print('耗时：{:.8f}s'.format(end_time - start_time))
    return int_time

@metric
def fib(max):
    n, a, b = 0, 0 ,1
    while n < max:
        print(b)
        a ,b = b, a + b
        n = n + 1

fib(1000)